Added babl_get_version () to the public API.
authorJan Heller <jheller@svn.gnome.org>
Tue, 3 Jun 2008 12:12:36 +0000 (12:12 +0000)
committerJan Heller <jheller@src.gnome.org>
Tue, 3 Jun 2008 12:12:36 +0000 (12:12 +0000)
2008-06-03  Jan Heller  <jheller@svn.gnome.org>

        Added babl_get_version () to the public API.

        * babl/Makefile.am: Added babl-version.h to library_include_HEADERS.
        * babl/babl-version.h.in: Added macros to expand to babl version
        information.
        * babl/babl.c (babl_get_version): Implemented.
        * babl/babl.h: Include babl-version.h, declare babl_get_version ().
        * configure.ac: Added babl-version.h to AC_CONFIG_FILES.

svn path=/trunk/; revision=318

ChangeLog
babl/Makefile.am
babl/babl.c
babl/babl.h
configure.ac

index efc8eff09d4e24513717f0e5ae3d7275707a2c95..e250c8a359664c61f4790e35c557b76eb4921644 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-06-03  Jan Heller  <jheller@svn.gnome.org>
+
+       Added babl_get_version () to the public API.
+
+       * babl/Makefile.am: Added babl-version.h to library_include_HEADERS.
+       * babl/babl-version.h.in: Added macros to expand to babl version
+       information.
+       * babl/babl.c (babl_get_version): Implemented.
+       * babl/babl.h: Include babl-version.h, declare babl_get_version ().
+       * configure.ac: Added babl-version.h to AC_CONFIG_FILES.
+
 2008-05-23  Jan Heller  <jheller@svn.gnome.org>
 
        * extensions/sse-fixups.c (init): Fixed conditionally compiled code.
index 771fb2c1d4cd86d9905a80f1a821074a2607ff74..c9efede0b327ff13d25ff5de4a7afe8d093bb08a 100644 (file)
@@ -54,7 +54,8 @@ library_include_HEADERS =             \
        babl-image.h                    \
        babl-model.h                    \
        babl-sampling.h                 \
-       babl-type.h
+       babl-type.h                     \
+       babl-version.h
 
 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/babl/base
 
index 97ec6fc97b84aa7477826112f25a6cfa29853e05..d672c75dc826d2b4c413c6ba66567122206c4600 100644 (file)
@@ -74,3 +74,18 @@ babl_destroy (void)
       babl_memory_sanity ();
     }
 }
+
+void     
+babl_get_version (int *major,   
+                  int *minor,   
+                  int *micro)   
+{       
+  if (major != NULL)    
+    *major = BABL_MAJOR_VERSION;        
+                 
+  if (minor != NULL)    
+    *minor = BABL_MINOR_VERSION;        
+                 
+  if (micro != NULL)    
+    *micro = BABL_MICRO_VERSION;        
+}
index 9547c8fcbd59ae10079f4d68f0a97c3030f813dd..bf46ef07e472d184fed1385da41314e800bb80fb 100644 (file)
@@ -81,6 +81,11 @@ void   babl_init       (void);
  */
 void   babl_destroy    (void);
 
+/** Get the version information on the babl library */
+void   babl_get_version (int *major,
+                         int *minor,
+                         int *micro);
+
 #if     __GNUC__ >= 4
 #define BABL_ARG_NULL_TERMINATED __attribute__((__sentinel__))
 #else
@@ -141,6 +146,7 @@ const char * babl_name       (const Babl *babl);
 
 void         babl_introspect (Babl       *babl); /* introspect a given BablObject     */
 
+#include "babl-version.h"
 #include "babl-type.h"
 #include "babl-sampling.h"
 #include "babl-component.h"
index b9c467187cbb1deb40913166f5e882f65f677b73..8dc52f1441a9dbaef5230291d69e4af6ca9ec27c 100644 (file)
@@ -386,6 +386,7 @@ AC_CONFIG_FILES(
 Makefile
 babl.pc
 babl/Makefile
+babl/babl-version.h
 babl/base/Makefile
 docs/Makefile
 docs/index-static.html